
#Linguagens de Programação - 2º Ano - 2º Semestre - Linguagem de Programação C
#Autor: Duarte Peres / Nº5621

## Created by Anjuta
#MakeFile - gera os ficheiros necessários para a compilação.


CC = gcc
CFLAGS = -g -Wall
OBJECTS = teachers.o\
teachers_wrap.o

INCFLAGS = -I/usr/include/python2.6
LDFLAGS = -shared
LIBS = -lsqlite3

all: _teachers.so
	
teachers_wrap.c: teachers.i
	swig -python teachers.i
	
teachers_wrap.o: teachers_wrap.c
	$(CC) -c -o teachers_wrap.o teachers_wrap.c $(INCFLAGS)
	
teachers.o: teachers.c
	$(CC) -c -o teachers.o teachers.c $(INCFLAGS)
	
_teachers.so: $(OBJECTS)
	ld -o _teachers.so $(OBJECTS) $(LDFLAGS) $(LIBS)
	

.SUFFIXES:
.SUFFIXES:	.c .cc .C .cpp .o

.c.o :
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o

.PHONY: all
.PHONY: count
.PHONY: clean
